#include <iostream>
#include <string>
using namespace std;

class Solution {
public:
    bool isSubsequence(string s, string t) {
        int begin_t = 0;
        int len_s = s.size();
        int len_t = t.size();
        for (int begin_s = 0; begin_s < len_s; ++begin_s) {

            if (s[begin_s] == t[begin_t]) {
                begin_t++;
            }
            if (begin_t == len_t) {
                return true;
            }
        }
        return false;
    }
};

int main()
{
    string s = "";
    string t = "ace";
    Solution obj;
    obj.isSubsequence(s, t);
    return 0;
}